﻿using System;
using System.Runtime.InteropServices;

namespace OmniKits.Windows.Interop.Interfaces
{
    [Flags]
    public enum InterfaceSafeOption : uint
    {
        None = 0,

        UntrustedCaller = 1,
        UntrustedData = 2,

        UsesIDispatchEx = 4,

        UsesSecurityManager = 8,
    }

    [ComImport]
    [Guid("CB5BDC81-93C1-11cf-8F20-00805F2CD064")]
    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IObjectSafety
    {
        void GetInterfaceSafetyOptions(ref Guid riid, out InterfaceSafeOption pdwSupportedOptions, out InterfaceSafeOption pdwEnabledOptions);

        void SetInterfaceSafetyOptions(ref Guid riid, InterfaceSafeOption dwOptionSetMask, InterfaceSafeOption dwEnabledOptions);
    }
}
